demos: Mark non-static signal handler symbols for export
authorChun-wei Fan <fanchunwei@src.gnome.org>
Thu, 6 May 2021 09:21:46 +0000 (17:21 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 7 May 2021 02:38:02 +0000 (10:38 +0800)
The symbols in the .ui files for the signal handlers and functions must be
exported so that the system can pick them up during execution.

Fixes #3918.

demos/gtk-demo/font_features.c
demos/gtk-demo/listview_filebrowser.c
demos/gtk-demo/shortcuts.c
demos/gtk-demo/spinbutton.c

index c8f9ebf62ac0501a2ab8df7b30be49c600b3fc5e..4c3af558e7ff49329647aaea7e98a05afb5c1a77 100644 (file)
@@ -1136,7 +1136,7 @@ done:
   g_free (design_coords);
 }
 
-void
+G_MODULE_EXPORT void
 font_features_font_changed (void)
 {
   update_script_combo ();
@@ -1144,14 +1144,14 @@ font_features_font_changed (void)
   update_font_variations ();
 }
 
-void
+G_MODULE_EXPORT void
 font_features_script_changed (void)
 {
   update_features ();
   update_display ();
 }
 
-void
+G_MODULE_EXPORT void
 font_features_reset_features (void)
 {
   GList *l;
@@ -1197,7 +1197,7 @@ switch_to_label (void)
   update_display ();
 }
 
-void
+G_MODULE_EXPORT void
 font_features_toggle_edit (void)
 {
   if (strcmp (gtk_stack_get_visible_child_name (GTK_STACK (stack)), "label") == 0)
@@ -1206,7 +1206,7 @@ font_features_toggle_edit (void)
     switch_to_label ();
 }
 
-void
+G_MODULE_EXPORT void
 font_features_stop_edit (void)
 {
   g_signal_emit_by_name (edit_toggle, "clicked");
index a840950ee8260acf35b473c2660c666d6f5f2529..e73ad41a0d7ff9bc79f10ed90b14682cf2ba3289 100644 (file)
@@ -34,6 +34,7 @@ enum {
 };
 
 #define FILE_BROWSER_TYPE_VIEW (file_browser_view_get_type ())
+G_MODULE_EXPORT
 G_DECLARE_FINAL_TYPE (FileBrowserView, file_browser_view, FILE_BROWSER, VIEW, GObject);
 
 G_DEFINE_TYPE (FileBrowserView, file_browser_view, G_TYPE_OBJECT);
@@ -159,7 +160,7 @@ static void file_browser_view_init (FileBrowserView *self)
 {
 }
 
-char *
+G_MODULE_EXPORT char *
 filebrowser_get_display_name (GObject *object,
                               GFileInfo *info)
 {
@@ -169,7 +170,7 @@ filebrowser_get_display_name (GObject *object,
   return g_strdup (g_file_info_get_attribute_string (info, "standard::display-name"));
 }
 
-char *
+G_MODULE_EXPORT char *
 filebrowser_get_content_type (GObject *object,
                               GFileInfo *info)
 {
@@ -179,7 +180,7 @@ filebrowser_get_content_type (GObject *object,
   return g_strdup (g_file_info_get_attribute_string (info, "standard::content-type"));
 }
 
-char *
+G_MODULE_EXPORT char *
 filebrowser_get_size (GObject *object,
                       GFileInfo *info)
 {
@@ -189,7 +190,7 @@ filebrowser_get_size (GObject *object,
   return g_format_size (g_file_info_get_attribute_uint64 (info, "standard::size"));
 }
 
-GIcon *
+G_MODULE_EXPORT GIcon *
 filebrowser_get_icon (GObject *object,
                       GFileInfo *info)
 {
@@ -206,7 +207,7 @@ filebrowser_get_icon (GObject *object,
   return icon;
 }
 
-void
+G_MODULE_EXPORT void
 filebrowser_up_clicked_cb (GtkButton        *button,
                            GtkDirectoryList *list)
 {
@@ -219,7 +220,7 @@ filebrowser_up_clicked_cb (GtkButton        *button,
   gtk_directory_list_set_file (list, file);
 }
 
-void
+G_MODULE_EXPORT void
 filebrowser_view_activated_cb (GtkGridView      *view,
                                guint             pos,
                                GtkDirectoryList *list)
index 7dcfe8fd429e3ba84cfff7c0ca178bb978b5c4a1..172ef61f43afecc253b5c363c4139f55c2ae1f12 100644 (file)
@@ -25,43 +25,43 @@ show_shortcuts (GtkWidget   *window,
   g_object_unref (builder);
 }
 
-void
+G_MODULE_EXPORT void
 shortcuts_builder_shortcuts (GtkWidget *window)
 {
   show_shortcuts (window, "shortcuts-builder", NULL);
 }
 
-void
+G_MODULE_EXPORT void
 shortcuts_gedit_shortcuts (GtkWidget *window)
 {
   show_shortcuts (window, "shortcuts-gedit", NULL);
 }
 
-void
+G_MODULE_EXPORT void
 shortcuts_clocks_shortcuts (GtkWidget *window)
 {
   show_shortcuts (window, "shortcuts-clocks", NULL);
 }
 
-void
+G_MODULE_EXPORT void
 shortcuts_clocks_shortcuts_stopwatch (GtkWidget *window)
 {
   show_shortcuts (window, "shortcuts-clocks", "stopwatch");
 }
 
-void
+G_MODULE_EXPORT void
 shortcuts_boxes_shortcuts (GtkWidget *window)
 {
   show_shortcuts (window, "shortcuts-boxes", NULL);
 }
 
-void
+G_MODULE_EXPORT void
 shortcuts_boxes_shortcuts_wizard (GtkWidget *window)
 {
   show_shortcuts (window, "shortcuts-boxes", "wizard");
 }
 
-void
+G_MODULE_EXPORT void
 shortcuts_boxes_shortcuts_display (GtkWidget *window)
 {
   show_shortcuts (window, "shortcuts-boxes", "display");
index fda257af17d822fe7a080c56c36ba3fcd2675fa6..44f0cfe8808568001907abfd1b70ea39fe5ac1a4 100644 (file)
@@ -12,7 +12,7 @@
 #include <math.h>
 #include <stdlib.h>
 
-int
+G_MODULE_EXPORT int
 spinbutton_hex_spin_input (GtkSpinButton *spin_button,
                            double        *new_val)
 {
@@ -29,7 +29,7 @@ spinbutton_hex_spin_input (GtkSpinButton *spin_button,
     return TRUE;
 }
 
-int
+G_MODULE_EXPORT int
 spinbutton_hex_spin_output (GtkSpinButton *spin_button)
 {
   GtkAdjustment *adjustment;
@@ -49,7 +49,7 @@ spinbutton_hex_spin_output (GtkSpinButton *spin_button)
   return TRUE;
 }
 
-int
+G_MODULE_EXPORT int
 spinbutton_time_spin_input (GtkSpinButton *spin_button,
                             double        *new_val)
 {
@@ -88,7 +88,7 @@ spinbutton_time_spin_input (GtkSpinButton *spin_button,
   return TRUE;
 }
 
-int
+G_MODULE_EXPORT int
 spinbutton_time_spin_output (GtkSpinButton *spin_button)
 {
   GtkAdjustment *adjustment;
@@ -122,7 +122,7 @@ static const char *month[12] = {
   "December"
 };
 
-int
+G_MODULE_EXPORT int
 spinbutton_month_spin_input (GtkSpinButton *spin_button,
                              double        *new_val)
 {
@@ -151,7 +151,7 @@ spinbutton_month_spin_input (GtkSpinButton *spin_button,
   return TRUE;
 }
 
-int
+G_MODULE_EXPORT int
 spinbutton_month_spin_output (GtkSpinButton *spin_button)
 {
   GtkAdjustment *adjustment;